package MonthGame.SpecialCode;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        StreamTokenizer st = new StreamTokenizer(bf);
        st.nextToken();
        int n = (int) st.nval;
        int x = 1, y = 0, z = 1;
        int [] a = new int [n];
        for(int i=1;i<n;i++){
            st.nextToken();
            a[i] = (int) st.nval;
        }
        for(int i=1;i<n;i++){
            a[0] = i;
            x = 1; y = 0; z = 1;
            y = y+a[x-1];
            x = x+a[x-1];
            z++;
            while(x>0&&x<=n){
                if(x == 1) break;
                if(z%2!=0){
                    y = y+a[x-1];
                    x = x+a[x-1];
                    z++;
                }else{
                    y = y+a[x-1];
                    x = x-a[x-1];
                    z++;
                }
            }
            if(i!=n-1){
                if(x==1) System.out.println(-1);
                else System.out.println(y);
            }
            else{
                if(x==1) System.out.print(-1);
                else System.out.print(y);
            }
        }
    }
}
